<?php
require_once('../../config.php');
Doctrine::loadModels('../../models');

if( $_GET["profit_loss_id"]) // AND $_GET["category_id"] AND $_GET["item_desc"] AND $_GET["item_value"])
{
    $profit_loss_id = strip_tags($_GET["profit_loss_id"]);
    $t_value = strip_tags($_GET["t_value"]);
	$t_currency_id = strip_tags($_GET["t_currency_id"]);
	$t_date = strip_tags($_GET["t_date"]);
	
	file_put_contents  ( "params_insert.txt", 
								"profit_loss_id '" .$profit_loss_id.
								"' t_value '" .$t_value.
								"' t_currency_id '" .$t_currency_id.
								"' t_date '" .$t_date."'");
	//add the budget entry
	$finTransaction = new FinTransactions();
	
	$finTransaction->year_start = $profit_loss_id;
	$finTransaction->year_end = $t_value;
	$finTransaction->comments = $t_currency_id;
	$finTransaction->comments = $t_date;
	$finTransaction->deleted = 0;
	/*
	$finTransaction->created = $created;
	$finTransaction->modified = $modified;
	$finTransaction->created_by = $created_by;
	$finTransaction->modified_by = $modified_by;
	*/	
	$finTransaction->save();
}

?>